/**
 * 
 */
package com.dalonedrow.rpg.base.systems;

import com.dalonedrow.engine.sprite.base.SimpleVector3;
import com.dalonedrow.rpg.base.flyweights.DamageInfo;

/**
 * @author Donald
 */
public interface Damages<IO> {
	/**
	 * Adds a screen splat to display.
	 * @param pos the position
	 * @param dmg the amount of damage
	 */
	void addScreenSplat(final SimpleVector3 pos, final float dmg);
	void addVisual(DamageInfo di, SimpleVector3 pos, float dmg, IO io);
	float damageNPC(int target, float dmg, int source,
			long flags, SimpleVector3 pos);
	void checkForIgnition(SimpleVector3 pos, float radius, long mode, long flag);
	float computeRepairPrice(IO torepair,
			IO blacksmith);
	void damageFIX(IO io, float dmg, long source, long flags,
			SimpleVector3 pos);
	void damagePlayer(int target, float dmg, long type, int source,
			SimpleVector3 pos);
	void damagePlayerEquipment(int target, float damages);
	float dealDamages(long target, float dmg, long source, long flags,
			SimpleVector3 pos);
	float drainMana(IO io, float dmg);
	void durabilityCheck(IO io, float ratio);
	void durabilityLoss(IO io, float loss);
	void durabilityRestore(IO io, float percent);
	void forceDeath(IO io_dead, IO io_killer);
	long getFreeIndex();
	void healInter(IO io, float dmg);
	void healManaInter(IO io, float dmg);
	void healManaPlayer(long target, float dmg);
	void healPlayer(long target, float dmg);
	long inExceptList(long dmg, long num);
	/** Initializes blood spatter instances. */
	void initScreenSplats();
	void pushPlayer(SimpleVector3 pos, float intensity);
	void renderBloodSpatter();
	void reset();
	void resetBloodInfo();
	/**
	 * Attempts to damage all IOs within a specific radius.
	 * @param pos the center point of the radius
	 * @param dmg the amount of damage attempted
	 * @param radius the damage radius
	 * @param source the reference ID of the IO attempting to cause the damage
	 * @return true any damage is caused; false otherwise
	 */
	boolean tryToDoDamage(SimpleVector3 pos, float dmg, float radius, 
			long source) throws Exception;
	void updateAll();
	void updateDamage(long j, float tim);
}
